#ifndef LYRICPANEL_H
#define LYRICPANEL_H
#include<QtGui>

class LyricPanel:public QWidget
{
    Q_OBJECT
public:
    explicit LyricPanel(QWidget* parent=0);
    void setColor(const QColor &foreColor);
    void setTextFont(const QFont &f);
    bool isLocked();
protected:
    void paintEvent(QPaintEvent *pe);
    void mouseMoveEvent(QMouseEvent *me);
    void mousePressEvent(QMouseEvent *me);
    void closeEvent(QCloseEvent *ce);
public slots:
    void setText(const QString &str);
    void setLocked(bool);
private:
    QPoint clickPos;
    QPoint startPos;
    QColor foreColor;
    QFont font;
    QString text;
    QRectF rect;
    bool locked;
signals:
    void needed(bool);
};

#endif // LYRICPANEL_H
